<?

if(!defined("SECTOK")) exit();
$email = $_POST['eaddr'];
//$email = "umingo@googlemail.com";
$subject = $_POST['esubj'];
$content = $_POST['econt'];
$from = "Sommeruni";
$fromemail = "sommerun@zedat.fu-berlin.de";

//fixme ... this can be abused by hacker ... 
//what if this page is called by extern with manipulated $_POST
//it would send emails by us to anyone ... even if not intended ...
//but hacker still needs to know password
echo "<h2>Folgende Email wurde gesendet</h2>";
echo "From: $fromemail<br>";
echo "To: $email<br>";
echo "Subject: $subject<br>";
echo "Inhalt: <br>";
//replace \n with <br> for displanign email correctly
echo "<div style='background-color:#EEE;padding:5px'>";
echo nl2br($content);
echo "</div>";

mail($email, $subject, $content, "From: $from <$fromemail>");

//TODO: REPLACE WITH OWN SEND_EMAIL FUNCTION 

?>